<?php

namespace backend\models;

use Yii;
use yii\data\ActiveDataProvider;


/**
 * This is the model class for table "{{%check}}".
 *
 * @property integer $id
 * @property string  $image
 * @property integer $ctime
 */
class Check extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName ()
    {
        return '{{%check}}';
    }

    /**
     * @inheritdoc
     */
    public function rules ()
    {
        return [
            [ ['pid','name','type','model','request_time','request_num','unit','image','status','price','all_price'],  "required"] ,
            [ ['reason','recipient','provider','buy_time','salvage','p_name','p_leader','b_leader','b_name'], "string"] ,
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels ()
    {
        return [
            'id'           => 'Check ID' ,
            'gid'          => '物资 ID' ,
            'bid'          => '被申请项目ID' ,
            'pid'          => '项目ID' ,
            'name'         => '物资名称' ,
            'type'         => '审核类型' ,
            'model'        => '物资型号' ,
            'request_time' => '申请时间' ,
            'request_num'  => '申请数量' ,
            'provider'     => '供应商' ,
            'recipient'    => '领取人' ,
            'unit'         => '单位' ,
            'image'        => '图片' ,
            'status'       => '审核状态' ,
            'buy_time'     => '购买时间' ,
            'price'        => '单价' ,
            'all_price'    => '总价' ,
            'reason'       => '报废原因' ,
            'project_name' => '项目名称',
            'salvage'      => '残值',
            'p_name'       => '调用人项目',
            'p_leader'     => '调用人姓名',
            'b_name'       => '被调用人项目',
            'b_leader'     => '被调用人姓名',
        ];
    }
}
